# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=dua
pkgver=2.24.2
pkgrel=0
pkgdesc="Tool to conveniently learn about the usage of disk space"
url="https://github.com/Byron/dua-cli"
license="MIT"
arch="all"
makedepends="cargo cargo-auditable"
source="https://github.com/Byron/dua-cli/archive/v$pkgver/dua-$pkgver.tar.gz"
builddir="$srcdir/dua-cli-$pkgver"
options="net" # fetch dependencies

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
3018067955723d0bd7bdb09a38b89b6acafd37bcdc517bfa3ce69574b430245aee4628ee61781830c2782d0ee1d0319f3e998dd06a236f1123d1898984db5aa7  dua-2.24.2.tar.gz
"
